{php include wl_template('common/header');}
{php include wl_template('diy/common/_common');}
<ul class="nav nav-tabs">
    <li><a href="{php echo web_url($backUrl);}">广告管理</a></li>
    <li class="active"><a href="javascript:;">编辑广告</a></li>
</ul>
<div class="app-content">
	<div class="form-group-title">编辑广告</div>
    <div class="main panel panel-default">
        <div class="page-content">
            <div class="row relative w900">
                <div class="diy-phone" data-merch="0" id="menuDiy-phone" >
                    <div class="phone-head"></div>
                    <div class="phone-body">
                        <div class="phone-title" id="page">启动广告</div>
                        <div class="phone-main" id="phone" style="position: relative; overflow: hidden; height: 500px">
                            <p style="text-align: center; line-height: 400px">loading...</p>
                        </div>
                    </div>
                    <div class="phone-foot"></div>
                </div>

                <div class="diy-editor form-horizontal" id="diy-editor">
                    <div class="editor-arrow"></div>
                    <div class="inner"></div>
                </div>
            </div>
            {php include wl_template('diy/common/_template_adv');}
        </div>
        <div class="page-footer"><nav class="btn btn-primary btn-sm btn-save" data-type="save">保存广告</nav></div>
    </div>
</div>
<script language="javascript">
    var path = 'diy/js/diy.adv';
    myrequire([path,'diy/js/tpl','js/biz'],function(modal,tpl){
        modal.init({
            adv_class:"{$advClass}",
            back_url:"{$backUrl}",
            tpl: tpl,
            id: '{php echo intval($_GPC["id"])}',
            attachurl: "{$_W['attachurl']}",
            menu: {if !empty($advs['data'])}{php echo json_encode($advs['data'])}{else}null{/if},
            merch: 0
        });
    });
</script>

<style>
	.fui-startadv {z-index: 5;}
	.fui-startadv .inner {z-index: 6;}
	.diy-editor {height: auto;overflow-y: hidden;display: block;margin: 0;position: inherit;width: 480px;float: right;}
	.page-content {height: auto;padding-bottom: 60px;}
	.page-footer {width: calc(100% - 230px);height: 60px;text-align: center;padding: 5px 0;background-color: #f9faff;position: fixed;left: 220px;bottom: 0;z-index: 999;}
	.page-footer .btn {font-size: 14px;margin-top: 10px;padding: 6px 12px;}
</style>
{php include wl_template('common/footer');}